package com.mkh.st.admin.api.feign;

import com.mkh.st.admin.api.dto.SysCompanyIdDTO;
import com.mkh.st.admin.api.entity.SysCompanyInfo;
import com.mkh.st.admin.api.vo.SelectCompanyVO;
import com.mkh.st.common.core.constant.ServiceNameConstants;
import com.mkh.st.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId = "sysCompanyProvider", value = ServiceNameConstants.UPMS_SERVICE,url ="${st.adminUrl:}")
public interface ISysCompanyProvider {

	@GetMapping("/company/provider/getCompanyList")
	R<List<SysCompanyInfo>> getCompanyList(@SpringQueryMap SysCompanyIdDTO dto);

	@GetMapping("/company/provider/getCompanyCodeList")
	R<List<SelectCompanyVO>> getCompanyCodeList(@RequestParam("menuCode") String menuCode);

	@GetMapping("/company/provider/getCompanyInfoByName")
	R<SelectCompanyVO> getCompanyInfoByName(@RequestParam("name") String name);

	@GetMapping("/company/provider/getCompanyInfoById")
	R<SelectCompanyVO> getCompanyInfoById(@RequestParam("companyId") Long companyId);
}
